package com.xiangxiangjd;

import com.xiangxiangjd.config.token.JwtUtils;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@MapperScan({"com.xiangxiangjd.mapper"})
//扫描公共模块下的包     注入注解

@SpringBootApplication
//启动缓存数据库
@EnableCaching
@EnableScheduling  //定时任务
@EnableAsync
@Slf4j
public class InitApiApplication {

    public static void main(String[] args) {
        log.info("Springboot启动中...." );
        SpringApplication.run(InitApiApplication.class, args);
        log.info("启动成功！");
    }
    //     注入值
    @Bean
    public JwtUtils jwtUtils() {
        return new JwtUtils();
    }


}
